//
//  constant.h
//  Translation
//
//  Created by mac on 17/3/6.
//  Copyright © 2017年 Mephsito. All rights reserved.
//

#ifndef constant_h
#define constant_h


///-----------
///屏幕宽度和高度
///-----------
#define kScreenBound [UIScreen mainScreen].bounds

///---------------------
///颜色全局定义方法和静态颜色
///---------------------
#define XZColor(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define XZColorAlpha(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

#define ColorTitle XZColor(50, 50, 50)

#define ColorNavTitle XZColor(50, 50, 50)

#define ColorMain XZColor(4, 129, 239)

#define ColorNav XZColor(4, 129, 239)

#define ColorLine XZColor(208, 208, 208)

#define ColorBG XZColor(230, 233, 240)

#define ColorWhite [UIColor whiteColor]

#define ColorGray [UIColor grayColor]


#define HexRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define HexRGBAlpha(rgbValue, a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)]

#define colorI3 0x4183C4

///-----------------------
///字体全局定义方法和定义的字体
///-----------------------

#define XZFont(a) [UIFont systemFontOfSize:a]
#define contentFont ((kScreenWidth>=375)?14:13)

/**310002 设备在其他地方登陆*/
#define codeLose  [[responseObj objectForKey:@"status"] isEqualToString:@"3100002"]||[[responseObj objectForKey:@"status"] isEqualToString:@"3100001"]


#define LazyLoadMethod(variable)    \
- (NSMutableArray *)variable \
{   \
if (!_##variable)  \
{   \
_##variable = [NSMutableArray array];  \
}   \
return _##variable;    \
}


#endif /* constant_h */
